package com.ogawa.base.download;

/**
 * 带权限比较的请求
 */
public abstract class IRequest implements Comparable<IRequest> {

	public int compareTo(IRequest o){
		//数值越大优先级越高
		return this.getPriority() < o.getPriority() ? 1  
              : this.getPriority() > o.getPriority() ? -1 : 0;  
	}
	
	public abstract int getPriority();
	public abstract boolean execute() throws Exception;
}
